<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>用户列表</title>
    <link href="/css/bootstrap.css" rel="stylesheet">
</head>

<style>
    a {
        color:#fff;
    }
    th {
        text-align: center;
    }
</style>

<body>
    <button class="btn btn-primary form-control" style="height:50px"><a th:href="@{'/insertPage'}">添加用户</a></button>
    <table class="table table-striped table-bordered table-hover text-center">
        <thead>
            <tr style="text-align:center">
                <th>Id</th>
                <th>Username</th>
                <th>Password</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
           <tr th:each="users:${users}">
               <td th:text="${users.id}"></td>
               <td th:text="${users.username}"></td>
               <td th:text="${users.password}"></td>
               <td>
                   <a class="btn btn-primary" th:href="@{'/updatePage/'+${users.id}}">更改</a>
                   <a class="btn btn-danger" th:href="@{'/delete/'+${users.id}}">删除</a>
               </td>
           </tr>
        </tbody>
    </table>

</body>
</html>